﻿@using System.Security.Claims
@{
    ViewData["Title"] = "Home Page";
}

<div class="row">
    <hr/>
    @if (Context.User.Identities.Any(i => i.IsAuthenticated))
    {
        <p>User is logged in as <strong>@Context.User.Claims.FirstOrDefault(c => c.Type == ClaimTypes.Name)?.Value</strong></p>
        <p>Claims:</p>
        <ul>
            @foreach (var claim in Context.User.Claims)
            {
                <li>@claim.Type: <strong>@claim.Value</strong></li>
            }
        </ul>
    }
    else
    {
        <p>User is not logged in</p>
    }

</div>